from django.contrib import admin
from django.utils.translation import ugettext_lazy as _
from gironimo.category.models import Category


class CategoryAdmin(admin.ModelAdmin):
    fieldsets = [
        (None,      {'fields': ['name', 'slug', 'content',]}),
        (_('HTML'), {'fields': ['html_title', 'html_description', 'html_keywords',], 'classes': ['collapse']}),
    ]
    list_display = ('name', 'created',)
    search_fields = ['name',]
    date_hierarchy = 'created'
    prepopulated_fields = {'slug': ('name',),}
    list_filter = ['created',]

admin.site.register(Category, CategoryAdmin)

